package com.cidp.system.dao.impl;

import java.io.Serializable;

import com.cidp.system.dao.IPermissionDao;
import com.cidp.system.pojo.OperatorDetailPo;
import com.cidp.system.pojo.PermissionPo;
import com.litt.core.dao.BaseDaoImpl;
import com.litt.core.page.IPageList;
import com.litt.core.page.PagePoParam;
/**
 * <b>标题：</b>权限表表管理DAO实现.
 * <pre><b>描述</b>
 *    操作员管理
 * </pre>
 * 
 * @author zhanglei
 * @since 2008-6-3
 * @version 1.0
 */
public class PermissionDaoImpl extends BaseDaoImpl implements IPermissionDao {

	/**
     * 根据主键查找对象.
     * @param className 类
     * @param id 主键值
     * @return Object 对象
     */
	public Object loadObject(Class className,Serializable id){
		return super.loadObject(className, id);
	}
	/**
     * 根据对象保存.
     * @param obj 对象
     * @return Long 主键值
     */
	public Long saveObject(Object obj){
		return super.saveObject(obj);
	}
	/**
     * 根据对象更新
     * @param obj 对象
     */
	public void updateObject(Object obj){
		super.updateObject(obj);
	}
	/**
     * 根据对象删除
     * @param obj 对象
     */
	public void deleteObject(Object obj){
		super.deleteObject(obj);
	}
	
	public IPageList listByPage(PagePoParam pagePoParam) 
	{
		PermissionPo obj = (PermissionPo) pagePoParam.getConds();
		StringBuffer listHql = new StringBuffer("from Tpermission where 1=1");
		StringBuffer listCountHql = new StringBuffer("select count(*) from Tpermission where 1=1 ");
		return super.listHqlPage(listHql.toString(), listCountHql.toString(),pagePoParam.getPageIndex(), pagePoParam.getPageSize());
	}

}
